/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.univcasa.biz.impl;

import com.univcasa.biz.SyncApogeeComptesENT;
import com.univcasa.db.model.CompteEtudiant;
import com.univcasa.db.model.Criteres;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author issam
 */
public class testApogee2Comptes {


    public static void main(String[] args){

        testAjoutApo2CmptEnt();
    }

    public static void testSimul(){
        SyncApogeeComptesENT manager = new SyncApogeeComptesENTImpl();

        Criteres form = new Criteres();
        form.addCritere("annee", "%" ) ;
        form.addCritere("etab", "%");
        form.addCritere("apogee", "7030087");

        //manager.ajouterComptesENTdepuisApogee( form );
        //manager.majComptesENTdepuisApogee( null );
        HashMap map = manager.simulerAjoutComptesENT2Apo(form);
        List resList = (List) map.get("list");
        Integer i = (Integer) map.get("i");
        System.out.println("i:"+i);
        for(Iterator itr=resList.iterator();itr.hasNext();){
            CompteEtudiant std = (CompteEtudiant) itr.next();
            System.out.println("Std" + std);
        }
        System.out.println("resList");
    }

    public static void testAjoutApo2CmptEnt(){
        SyncApogeeComptesENT manager = new SyncApogeeComptesENTImpl();

        Criteres form = new Criteres();
        form.addCritere("annee", "%" ) ;
        form.addCritere("etab", "%");
        form.addCritere("apogee", "7030087");

        //manager.ajouterComptesENTdepuisApogee( form );
        //manager.majComptesENTdepuisApogee( null );
        List resList = manager.ajouterComptesENTdepuisApogee(form);
        
        System.out.println("i:"+ resList.size() );
        for(Iterator itr=resList.iterator();itr.hasNext();){
            CompteEtudiant std = (CompteEtudiant) itr.next();
            System.out.println("Std" + std);
        }
        System.out.println("resList");
    }

}
